Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Rebase master and fix actor type IDs for HC #3

Merged
merged 25 commits into from
May 16, 2022
Merged

Rebase master and fix actor type IDs for HC #3

merged 25 commits into from
May 16, 2022

Conversation

adlrocha
Copy link

No description provided.

vyzo and others added 25 commits May 4, 2022 12:27
…ue-523

propagate all gas outputs in ApplyRet
Instead of looking up the memory export on every syscall, resolve it when we construct the invocation container.

fixes filecoin-project#510
* exec gas: apply only on non-structural instructions.

* pricelist: add new gas fees.

* gas: fully switch to milligas as canonical unit.

* price list: update gas cost formulae.

* price list: vertical spacing.

* kernel: apply extern gas.

* syscalls: charge for gas; small refactors.

* remove Kernel#charge_milligas().

Canonical unit is now milligas everywhere.

* fix tests.

* fix param.

* clippy.

* add comment.

* fix gas instrumentation.

* rename GasTracker#{charge_gas=>apply_charge} to disambiguate.

* add Gas and Milligas unit types to disambiguate.

* convert public gas charges to milligas.

* inclusion cost: adapt to milligas.

* charge_gas: move conversion to milligas to syscall handler.

* {to_milligas=>static_milligas}; make private.

* clippy.

* price list: remove compute_gas_multiplier (unused).

* polish comment.

* use saturation arithmetics for mem costs.

* price list: use Milligas type for cost fields.

* rename Kernel#charge_{=>milli}gas.

* add extern cost in syscall pricing formulae.

* charge for syscall gas at the right place.
Error if one tries to decode a bitfield that is too large.
This adds a new gas type to avoid things like:

1. Multiplying gas by gas (not possible now).
2. Swapping gas/milligas.
3. Not using saturating arithmetic.

This change also caught and fixed a bug where the "extra" consensus
fault fee from lotus was being charged as milligas, not gas.

Motivation: the previous commit that fixed a bug in window post cost
scaling.
…ce-list-snafu

Strongly typed gas units, and fix two related bugs
* wip better stack limits

* stack overflow integration test

* lower wasm stack / call depth limits

* use a threadpool with 64MiB stacks for execution

* Improve out-of-stack integration test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants